package asia.redact.bracket.util;

import java.util.Set;

/**
 * <pre>
 * Classes implementing RandomWords are used to generate words (in various languages)
 * much as Random or SecureRandom generates numbers. WordFilter is used to strengthen
 * the words into viable passwords.
 * 
 * </pre>
 * 
 * @author Dave
 *
 */
public interface RandomWords {

	public void addWordFilter(WordFilter filter);
	public int generate();
	public String getRandomSelection();
	public Set<String> getList();
	
	public static class Factory {
		/**
		 * Use local file which is a list of English dictionary words
		 * @return
		 */
		public static RandomWords defaultImpl() {
			return new RandomWordsImpl2();
		}
		
		/**
		 * Use Wikipedia as a source for words. Requires an internet connection.
		 * 
		 * @return
		 */
		public static RandomWords wikipediaImpl() {
			return new RandomWordsImpl();
		}
	}
	

}